package com.chb.jblog.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.chb.jblog.dao.LinksMapper;
import com.chb.jblog.entity.Links;
import com.chb.jblog.service.LinkService;

@Service
public class LinkServiceImpl implements LinkService {
	@Autowired
	private LinksMapper linksMapper;

	@Override
	public List<Links> selectByParameter(Map<String, Object> parameters) {
		return linksMapper.selectByParameter(parameters);
	}

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return linksMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Links record) {
		return linksMapper.insert(record);
	}

	@Override
	public int insertSelective(Links record) {
		return linksMapper.insertSelective(record);
	}

	@Override
	public Links selectByPrimaryKey(Integer id) {
		return linksMapper.selectByPrimaryKey(id);
	}

	@Transactional
	@Override
	public int updateByPrimaryKeySelective(Links record) {
		return linksMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Links record) {
		return linksMapper.updateByPrimaryKey(record);
	}

}
